// store.js
import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

// 应用初始状态
const state = {
	kind: 'all',
	msg: '1'
}

// 定义所需的 mutations
const mutations = {
	CHANGE_KIND(state, kind) {
		state.kind = kind
	},
	CHANGE_MSG(state, msg) {
		state.msg = msg
	}
}

// 创建 store 实例
export default new Vuex.Store({
	state,
	mutations
})